Barcode is a machine-recognizable visual identification of products. It encodes numerical digits and/or alphabetic letters into images. Barcode has been widely used in many applications, such as product checkout in retail stores and product tracking during shipping services. Barcode was designed originally for recognition by using special handheld devices. These devices emit energy to highlight barcode for accurate and fast recognition. This method is called active barcode recognition. Active barcode recognition has great impact on product flow. Recently, as mobile devices such as smartphones having integrated cameras are getting more and more popular, software applications have been implemented to recognize barcodes from images acquired by the integrated cameras. Because such method does not direct any energy, it is called passive barcode recognition. Passive barcode recognition on mobile devices provides useful applications because: (1) mobile devices have flexible internet access through wireless connection (e.g., 3G or WiFi) and (2) phone cameras can be utilized without extra cost for hardware. Other features (e.g., user location information) with mobile devices can also help to boost commercial applications, such as comparison shopping, gift registration, wedding registration, and so on.
In terms of image patterns, barcodes can be grouped into one-dimensional (“1D”) barcodes or two-dimensional (“2D”) barcodes. A 1D barcode image is composed by a series of parallel lines (bars). Line width and spacing encode numerical digits to identify product. Instead of bars, 2D barcodes use other symbols, such as dots and squares. The most popular barcodes in the market are 1D Universal Product Code (UPC) and 1D European Article Number (EAN). UPC encodes 12 numerical digits. It is popular in North American. EAN encodes 13 digits and popular in Europe, Japan, and other countries. Without mentioning further, the term “barcode” includes at least UPC and EAN.
Traditional passive barcode recognition methods have limited applications in practice because they require strict imaging environment in order to recognize barcode accurately and quickly. Among these requirements, phone cameras must have autofocus function, barcodes must be printed on even surface, and a handhold camera must remain steady during scanning. This invention provides an innovative method to recognize UPC and EAN quickly and accurately without the above restrictions or requirements. In other words, this invention is capable of quickly and accurately recognizing blurry barcode images. In addition, this invention performs greatly in decoding irregular barcodes, including barcodes printed on rounded surfaces, barcode on uneven surface, etc. Finally, human hands tend to shake in the practice of scanning barcodes. Rather than requiring users to hold cameras steadily, this invention exploits the shaking of handheld cameras to improve the performance of barcode recognition.
Power efficiency is significant in mobile applications due to limited battery capacity of mobile devices. This invention reduces the amount of battery power required to perform the recognition process because of its compact software design and efficient utilization of every single picture while avoiding redundant image information. If the video frame rate is appropriately controlled (e.g., 10 frames/second), successive images from a video sequence typically are not strongly correlated. This invention tries to decode every single image from a video sequence, even though some images are blurred due to camera out-of-focus. First, energy used to mechanically adjust the lens can be reduced. Second, energy used to capture images can be minimized. Third, this invention can recognize barcode on low-resolution images, so it minimizes the energy that would be consumed by high-resolution imaging. Fourth, this invention selectively decodes 1D scan lines across the bars within each image, because the successive scan lines are strongly correlated (on an ideal barcode image, all scan lines are the same.) In summary, this invention minimizes the usage of redundant information and maximizes the usage of independent information to speed up decoding process and improve decoding accuracy, which also saves the energy consumption.